package com.kavian.test.image;

import java.awt.image.BufferedImage;
import java.io.File;
import java.net.URL;

import javax.imageio.ImageIO;

/**  
 * @Filename:    MyTools→com.kavian.test.image→UrlFile.java
 * @Description:   URL文件保存到本地
 * @Copyright:   Copyright (c)2012 
 * @Company:     qoocc 
 * @author:   	kavian 
 * @version:    1.0  
 * Create at:  2012-6-29下午1:58:58
 *  
 * Modification History:  
 * Date                      Author           Version     Description  
 * ------------------------------------------------------------------  
 * 2012-6-29下午1:58:58   	     Administrator          1.0        1.0 Version  
 */
public class UrlFile{
	
	public static void main(String[] args) throws Exception {
		BufferedImage image = null;
		File file = new File("d://11.jpg");
		URL url = new URL("http://192.168.1.100:9080/search/user/picture/7742c6fba64f4431b1f33a65fad3d496.jpg");
		image = ImageIO.read(url);
		ImageIO.write(image, "jpg",file);
	}
	
}